package com.test.model;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.OneToOne;
import javax.persistence.PrimaryKeyJoinColumn;

@Entity
public class Body {

	
	private int id;
	private String bodyName;
	
	private Heart heart;
	private Head head;
	
	
	@OneToOne
	@PrimaryKeyJoinColumn
	public Heart getHeart() {
		return heart;
	}
	public void setHeart(Heart heart) {
		this.heart = heart;
	}
	@OneToOne
	@PrimaryKeyJoinColumn
	public Head getHead() {
		return head;
	}
	public void setHead(Head head) {
		this.head = head;
	}
	@Id
	@GeneratedValue
	public int getId() {
		return id;
	}
	public void setId(int id) {
		this.id = id;
	}
	public String getBodyName() {
		return bodyName;
	}
	public void setBodyName(String bodyName) {
		this.bodyName = bodyName;
	}
	
	
	
	
}


